{% load scheduletags %}
<table align="center" class="calendar">
	<caption><a href="{{ prev_url }}"><img align="top" border="0" src="{{MEDIA_URL}}left_mod.png"></a> &nbsp; <b>{{ day.start|date:"l, F d, Y" }}</b> &nbsp; <a href="{{ next_url }}"<img align="top" border="0" src="{{MEDIA_URL}}right_mod.png"></a></caption>
<tr><td width="68">&nbsp;</td><td width="325">Morning Events</td></td><td width="68">&nbsp;</td><td width="325">Afternoon and Evening Events</td></tr>
{% for am_slot, pm_slot in day_slots %}
<td class="compact"><small>{{ am_slot.start|time:"g:i a" }}</small></td>
{% if am_slot.has_occurrences %}<td class="compact busy">
{% for o in am_slot.get_occurrence_partials %}
{% ifequal o.class 0 %}{% title_and_options o.occurrence.event %}{% endifequal %}
{% ifequal o.class 1 %}{% title_and_options o.occurrence.event %}{% endifequal %}
{% endfor %}</td>
{% else %}<td class="compact free">{% create_event_url calendar am_slot.start %}</td>
{% endif %}
<td class="compact"><small>{{ pm_slot.start|time:"g:i a" }}</small></td>
{% if pm_slot.has_occurrences %}<td class="compact busy">
{% for o in pm_slot.get_occurrence_partials %}
{% ifequal o.class 0 %}{% title_and_options o.occurrence.event %}{% endifequal %}
{% ifequal o.class 1 %}{% title_and_options o.occurrence.event %}{% endifequal %}
{% endfor %}</td>
{% else %}<td class="compact free">{% create_event_url calendar pm_slot.start %}</td>
{% endif %}
</tr>
{% endfor %}
</table>
